'use strict';

function rank_by_two_large_one_small(collection) {
  //这里写代码。。。
  collection.sort((a, b) => {
    if (a > b) return 1
    if (a < b) return -1
    return 0
  })
  let result = []
  for (let i of collection) {
    let a=collection.shift()
    let b=collection.shift()
    let c=collection.shift()
    result.push(b,c,a)
  }
  return result.concat(collection)

}
module.exports = rank_by_two_large_one_small;
